function textControl() {
    number = number+1
    order_num = order_num+1
    custom.push({number:number,order_num:order_num,type:2})
    for(let index in custom){
        if(custom[index].number == number){
            custom[index].ionrange_1 = 0
            custom[index].ionrange_2 = 100
            custom[index].ionrange_3 = 200
        }
    }
    var html = ' <div class="form-group draggable dropped ui-draggable" id="dropped_'+number+'" data-number="'+number+'">\n' +
        '<div class="textControlClass">\n' +
        '        <div class="textControlTitle">我的这个小程序的主标题</div>\n' +
        '        <div class="textControlText">我是一只小小鸟，想要飞缺怎么样也飞不高！</div>\n' +
        '    </div>\n' +
        '        </div>'
    var img = $('#field_image').html()
    //隐藏所有
    $('#sortable_leve').find('div[class="level_number"]').css("display","none")
    var level = '<div class="level_number" style="width: 90%; position: relative" id="level_'+number+'" data-number="'+number+'">\n' +
        '<i style="position: absolute;right:-70px; top:-9px;font-size: 25px; cursor: pointer" class="fa fa-times LunboListClick"></i>\n' +
        ' <div class="m-b-sm m-t">\n' +
        '                            <small><strong>上边距</strong></small>\n' +
        '                        </div>\n' +
        '                        <div class="ionrange_1" data-number="'+number+'" ></div>\n' +
        ' <div class="m-b-sm m-t">\n' +
        '                            <small><strong>宽度调试</strong></small>\n' +
        '                        </div>\n' +
        '                        <div class="ionrange_2" data-number="'+number+'" ></div>\n' +
        ' <div class="m-b-sm m-t">\n' +
        '                            <small><strong>高度调试</strong></small>\n' +
        '                        </div>\n' +
        '                        <div class="ionrange_3" data-number="'+number+'"></div>\n' +
        ' <div class="m-b-sm m-t">\n' +
        '                            <small><strong>标题字体</strong></small>\n' +
        '                        </div>\n' +
        '                        <div class="ionrange_4" data-number="'+number+'" ></div>\n' +
        ' <div class="m-b-sm m-t">\n' +
        '                            <small><strong>子标题字体</strong></small>\n' +
        '                        </div>\n' +
        '                        <div class="ionrange_5" data-number="'+number+'" ></div>\n' +
        '                            <divid="level_numberBox_'+number+'">\n' +
        '                            <div class="hr-line-dashed"></div></div>\n' +
        '                            </div>\n' +
        '                        </div>'

    $('#sortable').append(html);
    $('#sortable_leve').append(level);

    $(".ionrange_1").ionRangeSlider({
        min: 0,
        max: 100,
        type: "single",
        step: 1,
        postfix: "px",
        prettify: false,
        hasGrid: true,
        from: 0,
        onChange:function (obj) {
            $("#dropped_"+obj.input.context.dataset.number+"").find("div[class='textControlClass']").css("margin-top",obj.fromNumber)
            for(let index in custom){
                if(custom[index].number == obj.input.context.dataset.number){
                    custom[index].ionrange_1 = obj.fromNumber
                }
            }

        }
    });
    $(".ionrange_2").ionRangeSlider({
        min: 0,
        max: 100,
        type: "single",
        step: 1,
        postfix: "%",
        prettify: false,
        hasGrid: true,
        from: 100,
        onChange:function (obj) {
            $("#dropped_"+obj.input.context.dataset.number+"").find("div[class='textControlClass']").css("width",obj.fromNumber+"%")
            for(let index in custom){
                if(custom[index].number == obj.input.context.dataset.number){
                    custom[index].ionrange_2 = obj.fromNumber
                }
            }

        }
    });
    $(".ionrange_3").ionRangeSlider({
        min: 0,
        max: 200,
        type: "single",
        step: 1,
        postfix: "px",
        prettify: false,
        hasGrid: true,
        from: 42,
        onChange:function (obj) {
            $("#dropped_"+obj.input.context.dataset.number+"").find("div[class='textControlClass']").css("height",obj.fromNumber+"px")
            for(let index in custom){
                if(custom[index].number == obj.input.context.dataset.number){
                    custom[index].ionrange_3 = obj.fromNumber
                }
            }
        }
    });
    $(".ionrange_4").ionRangeSlider({
        min: 0,
        max: 40,
        type: "single",
        step: 1,
        postfix: "px",
        prettify: false,
        hasGrid: true,
        from: 16,
        onChange:function (obj) {
            $("#dropped_"+obj.input.context.dataset.number+"").find("div[class='textControlTitle']").css("fontSize",obj.fromNumber+"px")
            for(let index in custom){
                if(custom[index].number == obj.input.context.dataset.number){
                    custom[index].ionrange_3 = obj.fromNumber
                }
            }
        }
    });
    $(".ionrange_5").ionRangeSlider({
        min: 0,
        max: 40,
        type: "single",
        step: 1,
        postfix: "px",
        prettify: false,
        hasGrid: true,
        from: 14,
        onChange:function (obj) {
            $("#dropped_"+obj.input.context.dataset.number+"").find("div[class='textControlText']").css("fontSize",obj.fromNumber+"px")
            for(let index in custom){
                if(custom[index].number == obj.input.context.dataset.number){
                    custom[index].ionrange_3 = obj.fromNumber
                }
            }
        }
    });
}
